import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // 综合分析侧边栏是否弹出
    clIsShow: 0,
    // 子系统菜单是否弹出
    childIsShow: 0,
    smartPark: 0,
    // 点击跳转的楼层号
    floorNumber: 0,
  },
  getters:{
    
  },
  mutations: {
    increase(state,payload){
      state.clIsShow++ 
      if(state.childIsShow %2 === 1){
        state.childIsShow++
      }
    },
    showChild(state,payload){
      state.childIsShow++
      if(state.clIsShow %2 === 1){
        state.clIsShow++
      }
    },
    showPark(state,payload){
      state.smartPark +=payload
    },
    // 修改跳转的楼层号
    getFloorNumber(state, payload){
      state.floorNumber = payload
    }
  },
  actions: {
  },
  modules: {
  }
})
